<template>
    <div>
        <tz-header></tz-header>
        <el-container>
            <el-container>
                <el-aside width="200px">
                    <el-menu
                        router
                        default-active="1"
                        class="el-menu-vertical-demo">
                        <el-submenu index="1">
                            <template slot="title">
                              <i class="el-icon-location"></i>
                              <span>首页相关</span>
                            </template>
                            <el-menu-item-group>
                              <el-menu-item index="/focus">设置轮播图</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="2">
                            <template slot="title">
                              <i class="el-icon-location"></i>
                              <span>用户相关</span>
                            </template>
                            <el-menu-item-group>
                              <el-menu-item index="/set/role">用户权限等操作</el-menu-item>
                              <el-menu-item index="/add/user">添加用户</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                         <el-submenu index="3">
                            <template slot="title">
                              <i class="el-icon-location"></i>
                              <span>图片相关</span>
                            </template>
                            <el-menu-item-group>
                              <el-menu-item index="/img/option">图片操作</el-menu-item>
                              <el-menu-item index="/remove/album">删除专辑</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="4">
                            <template slot="title">
                              <i class="el-icon-location"></i>
                              <span>文章相关</span>
                            </template>
                            <el-menu-item-group>
                              <el-menu-item index="/remove/acticle">删除文章</el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>
                    </el-menu>
                </el-aside>
                <el-main>
                    <router-view />
                </el-main>
            </el-container>
        </el-container>
        
    </div>
</template>

<script>
import Header from '../components/global/Header';
import { ref, onMounted } from '@vue/composition-api';
import axios from 'axios';

export default {
    components: {
        'tz-header': Header
    },
    setup(props, context) {
        axios.defaults.baseURL = 'http://localhost:3000';

        onMounted(() => {
            
        })

        
        
        const methods = {  }

        return {
            ...methods,
        }
    }
}
</script>